import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class UploadUrlResponseDto {
  @ApiProperty({
    description: 'Pre-signed URL for uploading a file',
    example:
      'https://bucket-name.obs.region.example.com/uploads/1234567890-file.pdf?AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Expires=1623456789&Signature=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
  })
  uploadUrl: string;

  @ApiProperty({
    description: 'Expiration time for the pre-signed URL in seconds',
    example: 3600,
  })
  expiresIn: number;

  @ApiProperty({
    description: 'Headers that must be included in the upload request',
    example: {
      'x-obs-acl': 'private',
    },
  })
  headers: Record<string, string>;

  @ApiPropertyOptional({
    description: 'Original resource name (only included in batch responses)',
    example: 'my-document.pdf',
  })
  resourceName?: string;
}
